1. Field of the Invention
The present invention relates to the technical field of image decompression and, more particularly, to a decompression system and method for discrete cosine transform (DCT)-base compressed graphic data with transparent attribute.
2. Description of Related Art
FIG. 1 is a block diagram of a typical game application platform. In order to save the computation and bandwidth on a 2D or 3D game application platform, a sprite image and a background image are pre-coded and pre-stored in a memory 110. When the rendering engine (RE) 130 is to read the spite image and the background image, a decompressor 120 decodes the sprite image and the background image. The rendering engine 130 performs an image processing, such as an alpha blending, on the sprite and background images. Next, the rendering engine 130 stores the image-processed RGB values in a frame buffer 112. A display 140 reads the corresponding data from the frame buffer 112 and displays the sprite image and the background image. For coding the sprite and background images, in addition to a variable run length (VRL) coding, the method commonly uses a color lookup table (CLUT) or Huffman coding.
When the rendering engine 130 stores the data in the frame buffer 112 by means of RGB values, the image corresponding to the data can be further coded. By means of a real-time rendering and graphic image display system, the prior art uses the CLUT, i.e., the date written in the frame buffer 112 by the rendering engine 130 is not the RGB values anymore, and instead an index base. For example, if one image can be representative of 256 colors only, the data required for being written to the frame buffer 112 can be representative of 8-bit index. For displaying the image, the CLUT is searched based on the index for obtaining the corresponding RGB data. The RGB data can be 16 or 24 bits. However, such a way has a serious disadvantage of the limited display color types.
In the 2D and 3D game platforms, the rendering engine 130 requires a transparent attribute description in order to superimpose the sprite and background images or perform the alpha blending. As shown in FIG. 2, a superimposed image 230 is generated when the sprite image 210 and the background image 220 are superimposed. A part of the road of the background image 220 is blocked in the superimposed image 230. Accordingly, a part of the outer of the car image (indicated by 240) in the dotted is defined as a transparent color, so the partial road of the background image 220 in the superimposed image 250 is not blocked.
However, since the sprite and background images have the transparent attribute, it is not suitable for a non-lossless compression, such as the JPEG and MPEG compression. Because there is no transparent attribute definition in the JPEG and MPEG compression, it results in bothers to a game developer. When several colors are defined to be different transparent attribute levels and the sprite and background images are compressed into a JPEG or MPEG format, it happens that the transparent part originally presented disappears after the decompression. This is because that the cosine-transform compression used by the JPEG and MPEG, which usually has a good compressing effect to general pictures, is known as a lossy compression, and thus the transparent attribute is lost in the compression and decompression.
Therefore, it is desirable to provide an improved decompression system and method to mitigate and/or obviate the aforementioned problems.